package logic

import (
	"C/renrenzhuC_srv/model/mysql"
	"context"

	"C/renrenzhuC_srv/internal/svc"
	"C/renrenzhuC_srv/renrenzhuC"

	"github.com/zeromicro/go-zero/core/logx"
)

type OrderStatusLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewOrderStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderStatusLogic {
	return &OrderStatusLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *OrderStatusLogic) OrderStatus(in *renrenzhuC.OrderStatusRequest) (*renrenzhuC.OrderStatusResponse, error) {
	// todo: add your logic here and delete this line
	var o = mysql.Order{}
	o.OrderStarts(in.OrderSn, in.Status)
	return &renrenzhuC.OrderStatusResponse{Success: true}, nil
}
